
//自定义
import { Module, DynamicModule, Global } from '@nestjs/common';

interface option {
  path: string;
}
@Global()
@Module({})
export class ConfigModule {
  static GetPath(option: option): DynamicModule {
    return {
      module: ConfigModule,
      providers: [
        {
          provide: 'testtoken',
          useValue: { test: option.path },
        },
      ],
      exports: [
        {
          provide: 'testtoken',
          useValue: { test: option.path },
        },
      ],
    };
  }
}
